package com.yunang.officialweb.service.impl;

import com.yunang.officialweb.entity.TotalDesc;
import com.yunang.officialweb.mapper.HomeMapper;
import com.yunang.officialweb.service.HomeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author duan
 * @date 2022/12/1 12:11
 */
@Service
public class HomeServiceImpl implements HomeService {
    @Resource
    private HomeMapper homeMapper;
    @Override
    public TotalDesc getCompanyIntroduce() {
        int id = 2;
        return homeMapper.getTotalDesc(id);
    }

    @Override
    public Boolean updateCompanyIntroduce(TotalDesc totalDesc) {
        totalDesc.setId(2);
        return homeMapper.updateTotalDesc(totalDesc);
    }

    @Override
    public TotalDesc getCompanyServices() {
        int id = 3;
        return homeMapper.getTotalDesc(3);
    }

    @Override
    public Boolean updateCompanyServices(TotalDesc totalDesc) {
        totalDesc.setId(3);
        return homeMapper.updateTotalDesc(totalDesc);
    }

    @Override
    public TotalDesc getAboutUs() {
        int id = 4;
        return homeMapper.getTotalDesc(id);
    }

    @Override
    public Boolean updateAboutUs(TotalDesc totalDesc) {
        totalDesc.setId(4);
        return homeMapper.updateTotalDesc(totalDesc);
    }

    @Override
    public TotalDesc getExcellentNumber() {
        int id = 5;
        return homeMapper.getTotalDesc(id);
    }

    @Override
    public Boolean updateExcellentNumber(TotalDesc totalDesc) {
        totalDesc.setId(5);
        return homeMapper.updateTotalDesc(totalDesc);
    }

}
